package download.itydl.com.sinlethread.mutilthread.db;

import java.util.List;

import download.itydl.com.sinlethread.mutilthread.bean.ThreadInfo;

/**
 * 代码解析可看单线程下载 ThreadDao 类
 *
 * @author howard
 */
public interface ThreadDao {

    void insertThreadInfo(ThreadInfo threadInfo);

    /**
     * 根据url删除线程信息  一个文件对应的所有线程信息都在数据库中删除掉
     * @param url
     */
    void deleteThreadInfo(String url);

    void upDateThreadInfo(String url, int thread_id, long progress);

    List<ThreadInfo> getThreadInfo(String url);

    boolean isExit(String url, int thread_id);
}
